<template>
  <div>
    <el-input type="textarea" :rows="10" style="width:400px;" v-model="markdownText"></el-input>
    <article class="markdown-body">
      <div v-html="htmlData"></div>
    </article>
  </div>
</template>

<script>
import 'github-markdown-css/github-markdown.css';
import marked from 'marked';
export default {
    name: 'MdToHtml',
    data() {
        return {
            markdownText: `\`\`\`javascript
console.log('hello world');
\`\`\``
        };
    },
    computed: {
        htmlData() {
            return marked(this.markdownText);
        }
    },
    created() {}
};
</script>

<style>
</style>
